package com.ambitor.ipro.actions;

import com.ambitor.grass.util.data.DataMap;
import com.ambitor.grass.util.data.IData;
import com.ambitor.ipro.util.Constants;

public class SuperAction extends BaseAction {

	private IData result = new DataMap();

	private static final long serialVersionUID = -7753422418047617178L;

	public IData getResult() {
		return result;
	}

	public void setResult(IData result) {
		this.result = result;
	}

	public String execute() {
		return SUCCESS;
	}

	@SuppressWarnings("unchecked")
	public String queryInstallProgress() {
		Object obj = pd.getSessionAttribute(Constants.SESSION_INSTL_PROGS);
		IData res = (IData) obj;
		if (res.getInt("code") == 0) {
			pd.RemoveSessionAttribute(Constants.SESSION_INSTL_PROGS);
		}
		this.setResult(res);
		return SUCCESS;
	}
}
